package com.project.Bean;

import java.time.LocalDate;

/**
 * 学生管理实体类
 */
public class Student  {
    /**学生id*/
    private int id;
    /**学生姓名*/
    private String name;
    /**性别*/
    private String sex;
    /**所在班级*/
    private ClassRoom classRoom;
    /**所在房间*/
    private Room room;
    /**学生头像*/
    private String image;
    /**入住时间*/
    private LocalDate date = LocalDate.now();
    /**联系电话*/
    private String phone;

    public Student() {
    }

    public Student(String name, String sex, int classId, int roomId, String image, String phone) {
        this.name = name;
        this.sex = sex;
        this.classRoom = new ClassRoom();
        this.classRoom.setId(classId);
        this.room = new Room();
        this.room.setId(roomId);
        this.image = image;
        this.phone = phone;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public ClassRoom getClassRoom() {
        return classRoom;
    }

    public void setClassRoom(ClassRoom classRoom) {
        this.classRoom = classRoom;
    }

    public Room getRoom() {
        return room;
    }

    public void setRoom(Room room) {
        this.room = room;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", classRoom=" + classRoom +
                ", room=" + room +
                ", image='" + image + '\'' +
                ", date=" + date +
                ", phone='" + phone + '\'' +
                "}\n";
    }
}
